<template>
<h1>隐藏显示指令</h1>
  <p v-if="true">张三</p>
  <p v-if="false">李四</p>
  <p>王五</p>
  <hr>
  <p v-if="isShow">月亮</p>
  <p v-if="isShow">星星</p>
  <p v-else>太阳</p>
  <hr>
  <p v-if="false">小红</p>
  <p v-show="false">小红</p>
  <p style="display: none">小绿</p>

</template>

<script setup>
import {ref} from "vue";

const isShow = ref(true)
</script>

<style scoped>

</style>